php mysqli connect to two databases pdo

112

$conn1 = new PDO("mysql:host=$hostname;dbname=database1", $username, $password);
$conn2 = new PDO("mysql:host=$hostname;dbname=database1", $username, $password);

$conn1->query("SELECT * FROM table");
$conn1->query("SELECT * FROM table");

Comments

Submit
0 Comments